import request from '../../utils/request';
import { OnionUtils } from '../../utils/onion-utils';

//参数限流规则列表查询
export const doFindParamRules = queryData => {
    return request({
        url: '/api/configic/flow/param/listPage',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'queryData'},
        buildType : 'queryData',
        data: queryData
    });
};

//获取参数限流规则详细
export const doGetParamRule = paramData => {
    return request({
        url: '/api/configic/flow/param/getParamRule',
        method: 'post',
        header:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
}

//参数限流规则列表查询【分页】
export const doFindParamRulesByPage = queryData => {
    return request({
        url: '/api/configic/flow/param/listPage',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'queryData'},
        buildType : 'queryData',
        data: queryData
    });
};

//保存参数限流规则
export const doSaveParamRule = formData => {
    return request({
        url: '/api/configic/flow/param/saveParamRule',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: formData
    });
};

export const doDeleteParamRule = paramData => {
    return request({
        url: '/api/configic/flow/paramlimit/deleteLimitRule',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    })
}